home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 15: Shareware / PC Actual CDT 15.iso / files / Windows_95_98 / Programacion / Java / kinst351a.exe / data1.cab / plugin_samples / KawaPlugin9.java < prev    next >
Encoding:
Java Source  |  2000-02-17  |  819 b   |  28 lines

  1. import java.util.*;
  2. import com.tektools.kawa.plugin.*;
  3.  
  4. /** This sample program enumerates all the editors and prints some editor values */
  5. public class KawaPlugin9
  6. {
  7.     public static void main(String[] args)
  8.     {
  9.         KawaApp.out.showWindow(true);
  10.         KawaApp.out.clearWindow();
  11.         Enumeration enum = KawaApp.enumerateEditors();
  12.         while(enum.hasMoreElements())
  13.         {
  14.             KawaEditor editor = (KawaEditor)enum.nextElement();
  15.             if (editor != null)
  16.             {
  17.                 KawaApp.out.println("Path - "+editor.getPath());
  18.                 KawaApp.out.println("    Lines - "+editor.getLineCount());
  19.                 for (int i=0;i<editor.getLineCount();i++)
  20.                 {
  21.                     KawaApp.out.println(" "+editor.getLineIndex(i)+"-"+editor.getLineLength(i));                    
  22.                 }
  23.                 editor.gotoLine(10, false);
  24.                 KawaApp.out.println(editor.getEditorText());    
  25.             }
  26.         }
  27.     }
  28. }